# -*- coding:utf-8 -*-
#Author LJ 
#Mail:admin@attacker.club
#Site:blog.attacker.club
#description
import re
#re正则模块
import urllib2

NUMBER = re.compile(r'[0-9]')#全数字
LOWER_CASE = re.compile(r'[a-z]')#全小写
UPPER_CASE = re.compile(r'[A-Z]')#全大写
OTHERS = re.compile(r'[^0-9a-zA-Z]')#
#特征调

file=urllib2.urlopen ('http://list.attacker.club/4.config/password/10k_most_common.txt')
pwd_dict = file.read ()
# 弱密码字典


class Strength:
    def __init__(self, valid, strength, message):
        self.valid = valid
        self.strength = strength
        self.message = message
#定义三个属性有效的密码（valid），强度（strength），友好的提示信息（message）。


def load_common_password():
    words = []
    with open('10k_most_common.txt', 'rb') as f:
        for word in f.readlines():
            words.append(word.strip())
    return words


http://www.jianshu.com/p/4c79320f59f9 待整理
